package com.dingreading.cloud.common.util;

public enum MstXcxClassType {
    BEFORECLASS(1, "课前预习"),
    INCLASS(2, "课堂巩固"),
    AFTERCLASS(3, "课后作业"),
    EXAM(4, "名师精讲"),
    ;

    private final Integer type;
    private final String name;

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }


    //构造方法
    MstXcxClassType(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getName(Integer type) {
        for (MstXcxClassType data : MstXcxClassType.values()) {
            if (data.getType().equals(type)) {
                return data.getName();
            }
        }
        return "";
    }
}
